/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JInternalFrameVender1.java
 *
 * Created on Dec 8, 2011, 7:44:22 PM
 */
package callcenter;

import Database.Vender;
import java.io.IOException;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import Util.Check;
import java.awt.Color;
import java.io.File;
import javax.swing.ImageIcon;

public class JInternalFrameVender1 extends javax.swing.JInternalFrame {

    Vector<Vender> vdr = new Vector<Vender>();
    private boolean rs = false;
    private int count = 1;
    private File f = new File(".");
    private String langue = new String();
    private String country = new String();
    private String chuoi = new String();
    private Locale lc = null;
    private ResourceBundle rb = null;
    private int b;
    private String vt, vt1, vt2, vt3, vt4, vt5;

    //private int a;
    /** Creates new form JInternalFrameVender1 */
    public JInternalFrameVender1() {

        initComponents();

        // Vender.VenderPT(1);


        if (Medium.jf1.KQ() == 0) {
            //"callcenter/resources/JInternalFrameVender1_en_US
            Translate("en", "English", "JInternalFrameVender1_en_US");
        } else {
            Translate("vi", "Vietnamese", "JInternalFrameVender1_vi_VN");
        }
        jButtonPrevious.setEnabled(false);

        ShowList(0, 5);
        jButtonPrevious.setEnabled(false);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    private void Translate(String landue, String tenqg, String chuoi) {
        lc = new Locale(landue, tenqg);
        rb = ResourceBundle.getBundle("callcenter/resources/" + chuoi, lc);
        jTabbedPane1.setTitleAt(0, rb.getString("tab1"));
        jTabbedPane1.setTitleAt(1, rb.getString("tab2"));
        TitledBorder t = (TitledBorder) this.jPanel3.getBorder();
        t.setTitle(rb.getString("jPanel3.border.title"));
        jLabel1.setText(rb.getString("jLabel1.text"));
        jLabel2.setText(rb.getString("jLabel2.text"));
        jLabel3.setText(rb.getString("jLabel3.text"));
        jLabel4.setText(rb.getString("jLabel4.text"));
        jLabel6.setText(rb.getString("jLabel6.text"));
        jLabel7.setText(rb.getString("jLabel7.text"));

        jButtonAdd.setText(rb.getString("jButtonAdd.text"));
        jButtonEdit.setText(rb.getString("jButtonEdit.text"));
        jButtonDelete.setText(rb.getString("jButtonDelete.text"));
        jButtonRefresh.setText(rb.getString("jButtonRefresh.text"));
        jButtonNext.setText(rb.getString("jButtonNext.text"));
        jButtonPrevious.setText(rb.getString("jButtonPrevious.text"));
        //jButtonEnter.setText(rb.getString("jButtonEnter.text"));

        jLabel7.setText(rb.getString("jLabel7.text"));
        jButtonSearch.setText(rb.getString("jButtonSearch.text"));
        TitledBorder t2 = (TitledBorder) this.jPanel41.getBorder();
        t2.setTitle(rb.getString("jPanel41.border.title"));
        vt1 = rb.getString("vt1");
        vt2 = rb.getString("vt2");
        vt3 = rb.getString("vt3");
        vt4 = rb.getString("vt4");
        vt5 = rb.getString("vt5");
    }

    private void ShowList(int a, int b) {
        Vector<Vector<Object>> cl = new Vector<Vector<Object>>(Vender.VenderPT().subList(a, b));
        Vector<Object> cols = new Vector<Object>();
        cols.add(vt1);
        cols.add(vt2);
        cols.add(vt3);
        cols.add(vt4);
        cols.add(vt5);
        DefaultTableModel dtm = new DefaultTableModel(cl, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableVender.getTableHeader().setReorderingAllowed(false);
        this.jTableVender.setModel(dtm);

    }

    private void GetInfomation() {
        String Vdd = this.jTableVender.getValueAt(this.jTableVender.getSelectedRow(), 0).toString();
        Vender vd = new Vender();
        vd = Vender.InfomationVender(Vdd);
        this.jTextFieldVenderName.setText(vd.getVenderName());
        this.jTextFieldAddress.setText(vd.getAddress());
        this.jTextFieldEmail.setText(vd.getEmail());
        this.jTextFieldPhone.setText(vd.getPhone());
    }

    private void Clear() {
        rs = false;
        this.jLabelValue.setText("");
        this.jTextFieldVenderName.setText("");
        this.jTextFieldAddress.setText("");
        this.jTextFieldEmail.setText("");
        this.jTextFieldPhone.setText("");
        this.jLabelVenderNameKT.setText("");
        this.jLabelAddressKT.setText("");
        this.jLabelEmailKT.setText("");
        this.jLabelPhoneKT.setText("");
        //this.jLabelValue.setText("");

    }

    private void EditV() {
        Vender vd = new Vender();
        vd.setVenderName(this.jTextFieldVenderName.getText());
        vd.setAddress(this.jTextFieldAddress.getText());
        vd.setEmail(this.jTextFieldEmail.getText());
        vd.setPhone(this.jTextFieldPhone.getText());
        vd.setVenderId(Integer.valueOf(jLabelValue.getText()));

        if (jTextFieldVenderName.getText().trim().equals("")) {
            this.jLabelVenderNameKT.setText("Not null");
            jTextFieldVenderName.requestFocus();
            return;
        }
        if (jTextFieldAddress.getText().trim().equals("")) {
            this.jLabelAddressKT.setText("Not null");
            jTextFieldAddress.requestFocus();
            return;
        }
        if (!Check.Emailinvalid(jTextFieldEmail.getText())) {
            this.jLabelEmailKT.setText("Invalid");
            jTextFieldEmail.requestFocus();
            return;
        }
        if (jTextFieldPhone.getText().trim().equals("")) {
            this.jLabelPhoneKT.setText("Not null");
            return;
        }

        if (vd.EditVender(Integer.valueOf(jLabelValue.getText()))) {
            //JOptionPane.showMessageDialog(null, "Edit successfully!");
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\change.png");
                JOptionPane.showMessageDialog(null, "Edited successful", "Notice", 0, iic);
                int b = (count * 5) - 5;
                ShowList(b, count * 5);
                Clear();
            } catch (Exception e) {
            }
           if(count>Vender.Count()/5)
                        {
                            int d=(count-1)*5;
                            ShowList(d, Vender.Count());
                            jButtonNext.setEnabled(false);
                        }
                                   else
                        {

                            int b= (count*5)-5;
                        jLabelValue.setText(String.valueOf(count));

                        ShowList(b, count*5);
                        }
        } else {
            // JOptionPane.showMessageDialog(null, "Failure edit");
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\error.png");
                JOptionPane.showMessageDialog(null, "Edit failure", "Notice", 0, iic);
            } catch (Exception e) {
            }
        }
    }

    public boolean KTS(String vender) {
        boolean kq = true;
        if (!Vender.Identical(vender)) {
            kq = false;
        } else {
            kq = true;
        }
        return kq;
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel66 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jTextField1 = new javax.swing.JTextField();
        jPanel74 = new javax.swing.JPanel();
        jPanel78 = new javax.swing.JPanel();
        jPanel79 = new javax.swing.JPanel();
        jPanel81 = new javax.swing.JPanel();
        jPopupMenu1 = new javax.swing.JPopupMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jPanel33 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        jPanel36 = new javax.swing.JPanel();
        jButton4 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jPanel80 = new javax.swing.JPanel();
        jPanel82 = new javax.swing.JPanel();
        jLabelVenderNameKT = new javax.swing.JLabel();
        jPanel83 = new javax.swing.JPanel();
        jLabelAddressKT = new javax.swing.JLabel();
        jPanel84 = new javax.swing.JPanel();
        jLabelEmailKT = new javax.swing.JLabel();
        jPanel85 = new javax.swing.JPanel();
        jLabelPhoneKT = new javax.swing.JLabel();
        jPanel86 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        jTextFieldVenderName = new javax.swing.JTextField();
        jPanel18 = new javax.swing.JPanel();
        jTextFieldAddress = new javax.swing.JTextField();
        jPanel19 = new javax.swing.JPanel();
        jTextFieldEmail = new javax.swing.JTextField();
        jPanel20 = new javax.swing.JPanel();
        jTextFieldPhone = new javax.swing.JTextField();
        jPanel21 = new javax.swing.JPanel();
        jPanel22 = new javax.swing.JPanel();
        jButtonAdd = new javax.swing.JButton();
        jPanel23 = new javax.swing.JPanel();
        jPanel24 = new javax.swing.JPanel();
        jButtonEdit = new javax.swing.JButton();
        jPanel25 = new javax.swing.JPanel();
        jPanel26 = new javax.swing.JPanel();
        jButtonDelete = new javax.swing.JButton();
        jPanel27 = new javax.swing.JPanel();
        jButtonRefresh = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jPanel30 = new javax.swing.JPanel();
        jPanel31 = new javax.swing.JPanel();
        jPanel39 = new javax.swing.JPanel();
        jLabelValue = new javax.swing.JLabel();
        jPanel32 = new javax.swing.JPanel();
        jPanel34 = new javax.swing.JPanel();
        jPanel37 = new javax.swing.JPanel();
        jButtonPrevious = new javax.swing.JButton();
        jPanel38 = new javax.swing.JPanel();
        jButtonNext = new javax.swing.JButton();
        jPanel87 = new javax.swing.JPanel();
        jTextFieldGTri = new javax.swing.JTextField();
        jPanel88 = new javax.swing.JPanel();
        jButtonEnter = new javax.swing.JButton();
        jPanel29 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTableVender = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jPanel40 = new javax.swing.JPanel();
        jPanel42 = new javax.swing.JPanel();
        jPanel43 = new javax.swing.JPanel();
        jPanel44 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jPanel46 = new javax.swing.JPanel();
        jPanel47 = new javax.swing.JPanel();
        jPanel49 = new javax.swing.JPanel();
        jPanel50 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jPanel51 = new javax.swing.JPanel();
        jPanel52 = new javax.swing.JPanel();
        jPanel53 = new javax.swing.JPanel();
        jPanel54 = new javax.swing.JPanel();
        jPanel48 = new javax.swing.JPanel();
        jPanel55 = new javax.swing.JPanel();
        jPanel56 = new javax.swing.JPanel();
        jTextFieldVDSearch = new javax.swing.JTextField();
        jPanel57 = new javax.swing.JPanel();
        jPanel61 = new javax.swing.JPanel();
        jPanel62 = new javax.swing.JPanel();
        jPanel63 = new javax.swing.JPanel();
        jButtonSearch = new javax.swing.JButton();
        jPanel64 = new javax.swing.JPanel();
        jPanel58 = new javax.swing.JPanel();
        jPanel59 = new javax.swing.JPanel();
        jPanel60 = new javax.swing.JPanel();
        jPanel41 = new javax.swing.JPanel();
        jPanel67 = new javax.swing.JPanel();
        jPanel69 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTableVenderS = new javax.swing.JTable();
        jPanel65 = new javax.swing.JPanel();
        jPanel68 = new javax.swing.JPanel();
        jPanel71 = new javax.swing.JPanel();
        jPanel72 = new javax.swing.JPanel();
        jPanel70 = new javax.swing.JPanel();
        jPanel91 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jPanel73 = new javax.swing.JPanel();
        jPanel75 = new javax.swing.JPanel();
        jButton8 = new javax.swing.JButton();
        jPanel76 = new javax.swing.JPanel();
        jButton11 = new javax.swing.JButton();
        jPanel77 = new javax.swing.JPanel();
        jPanel89 = new javax.swing.JPanel();
        jButton9 = new javax.swing.JButton();
        jPanel90 = new javax.swing.JPanel();
        jTextField3 = new javax.swing.JTextField();

        jPanel66.setName("jPanel66"); // NOI18N

        javax.swing.GroupLayout jPanel66Layout = new javax.swing.GroupLayout(jPanel66);
        jPanel66.setLayout(jPanel66Layout);
        jPanel66Layout.setHorizontalGroup(
            jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 946, Short.MAX_VALUE)
        );
        jPanel66Layout.setVerticalGroup(
            jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(callcenter.CallcenterApp.class).getContext().getResourceMap(JInternalFrameVender1.class);
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N

        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N

        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N

        jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N
        jTextField1.setName("jTextField1"); // NOI18N

        jPanel74.setName("jPanel74"); // NOI18N

        javax.swing.GroupLayout jPanel74Layout = new javax.swing.GroupLayout(jPanel74);
        jPanel74.setLayout(jPanel74Layout);
        jPanel74Layout.setHorizontalGroup(
            jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel74Layout.setVerticalGroup(
            jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel78.setName("jPanel78"); // NOI18N

        javax.swing.GroupLayout jPanel78Layout = new javax.swing.GroupLayout(jPanel78);
        jPanel78.setLayout(jPanel78Layout);
        jPanel78Layout.setHorizontalGroup(
            jPanel78Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel78Layout.setVerticalGroup(
            jPanel78Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel79.setName("jPanel79"); // NOI18N

        javax.swing.GroupLayout jPanel79Layout = new javax.swing.GroupLayout(jPanel79);
        jPanel79.setLayout(jPanel79Layout);
        jPanel79Layout.setHorizontalGroup(
            jPanel79Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel79Layout.setVerticalGroup(
            jPanel79Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel81.setName("jPanel81"); // NOI18N

        javax.swing.GroupLayout jPanel81Layout = new javax.swing.GroupLayout(jPanel81);
        jPanel81.setLayout(jPanel81Layout);
        jPanel81Layout.setHorizontalGroup(
            jPanel81Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel81Layout.setVerticalGroup(
            jPanel81Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPopupMenu1.setName("jPopupMenu1"); // NOI18N

        jMenuItem1.setIcon(resourceMap.getIcon("jMenuItem1.icon")); // NOI18N
        jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
        jMenuItem1.setName("jMenuItem1"); // NOI18N
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jPopupMenu1.add(jMenuItem1);

        jPanel33.setName("jPanel33"); // NOI18N

        javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33);
        jPanel33.setLayout(jPanel33Layout);
        jPanel33Layout.setHorizontalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel33Layout.setVerticalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel35.setName("jPanel35"); // NOI18N

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel36.setName("jPanel36"); // NOI18N

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N

        jButton10.setText(resourceMap.getString("jButton10.text")); // NOI18N
        jButton10.setName("jButton10"); // NOI18N

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(970, 520));

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setLayout(new java.awt.GridLayout(2, 1, 3, 3));

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel3.border.border.lineColor"), 3), resourceMap.getString("jPanel3.border.title"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setPreferredSize(new java.awt.Dimension(200, 181));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 200, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 189, Short.MAX_VALUE)
        );

        jPanel3.add(jPanel5, java.awt.BorderLayout.LINE_START);

        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setPreferredSize(new java.awt.Dimension(290, 181));
        jPanel6.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel80.setName("jPanel80"); // NOI18N

        javax.swing.GroupLayout jPanel80Layout = new javax.swing.GroupLayout(jPanel80);
        jPanel80.setLayout(jPanel80Layout);
        jPanel80Layout.setHorizontalGroup(
            jPanel80Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 290, Short.MAX_VALUE)
        );
        jPanel80Layout.setVerticalGroup(
            jPanel80Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel6.add(jPanel80);

        jPanel82.setName("jPanel82"); // NOI18N
        jPanel82.setLayout(new java.awt.GridLayout(1, 0));

        jLabelVenderNameKT.setFont(resourceMap.getFont("jLabelVenderNameKT.font")); // NOI18N
        jLabelVenderNameKT.setForeground(resourceMap.getColor("jLabelVenderNameKT.foreground")); // NOI18N
        jLabelVenderNameKT.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelVenderNameKT.setText(resourceMap.getString("jLabelVenderNameKT.text")); // NOI18N
        jLabelVenderNameKT.setName("jLabelVenderNameKT"); // NOI18N
        jPanel82.add(jLabelVenderNameKT);

        jPanel6.add(jPanel82);

        jPanel83.setName("jPanel83"); // NOI18N
        jPanel83.setLayout(new java.awt.GridLayout(1, 0));

        jLabelAddressKT.setFont(resourceMap.getFont("jLabelAddressKT.font")); // NOI18N
        jLabelAddressKT.setForeground(resourceMap.getColor("jLabelAddressKT.foreground")); // NOI18N
        jLabelAddressKT.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelAddressKT.setText(resourceMap.getString("jLabelAddressKT.text")); // NOI18N
        jLabelAddressKT.setName("jLabelAddressKT"); // NOI18N
        jPanel83.add(jLabelAddressKT);

        jPanel6.add(jPanel83);

        jPanel84.setName("jPanel84"); // NOI18N
        jPanel84.setLayout(new java.awt.GridLayout(1, 0));

        jLabelEmailKT.setFont(resourceMap.getFont("jLabelEmailKT.font")); // NOI18N
        jLabelEmailKT.setForeground(resourceMap.getColor("jLabelEmailKT.foreground")); // NOI18N
        jLabelEmailKT.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelEmailKT.setText(resourceMap.getString("jLabelEmailKT.text")); // NOI18N
        jLabelEmailKT.setName("jLabelEmailKT"); // NOI18N
        jPanel84.add(jLabelEmailKT);

        jPanel6.add(jPanel84);

        jPanel85.setName("jPanel85"); // NOI18N
        jPanel85.setLayout(new java.awt.GridLayout(1, 0));

        jLabelPhoneKT.setFont(resourceMap.getFont("jLabelPhoneKT.font")); // NOI18N
        jLabelPhoneKT.setForeground(resourceMap.getColor("jLabelPhoneKT.foreground")); // NOI18N
        jLabelPhoneKT.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelPhoneKT.setText(resourceMap.getString("jLabelPhoneKT.text")); // NOI18N
        jLabelPhoneKT.setName("jLabelPhoneKT"); // NOI18N
        jPanel85.add(jLabelPhoneKT);

        jPanel6.add(jPanel85);

        jPanel86.setName("jPanel86"); // NOI18N
        jPanel86.setPreferredSize(new java.awt.Dimension(200, 29));

        javax.swing.GroupLayout jPanel86Layout = new javax.swing.GroupLayout(jPanel86);
        jPanel86.setLayout(jPanel86Layout);
        jPanel86Layout.setHorizontalGroup(
            jPanel86Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 290, Short.MAX_VALUE)
        );
        jPanel86Layout.setVerticalGroup(
            jPanel86Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel6.add(jPanel86);

        jPanel3.add(jPanel6, java.awt.BorderLayout.LINE_END);

        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setLayout(new java.awt.BorderLayout());

        jPanel8.setName("jPanel8"); // NOI18N
        jPanel8.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel10.setName("jPanel10"); // NOI18N

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel8.add(jPanel10);

        jPanel11.setName("jPanel11"); // NOI18N
        jPanel11.setLayout(new java.awt.BorderLayout());

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        jPanel11.add(jLabel1, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel11);

        jPanel12.setName("jPanel12"); // NOI18N
        jPanel12.setLayout(new java.awt.BorderLayout());

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        jPanel12.add(jLabel2, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel12);

        jPanel13.setName("jPanel13"); // NOI18N
        jPanel13.setLayout(new java.awt.BorderLayout());

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N
        jPanel13.add(jLabel3, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel13);

        jPanel14.setName("jPanel14"); // NOI18N
        jPanel14.setLayout(new java.awt.BorderLayout());

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N
        jPanel14.add(jLabel4, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel14);

        jPanel15.setName("jPanel15"); // NOI18N

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel8.add(jPanel15);

        jPanel7.add(jPanel8, java.awt.BorderLayout.LINE_START);

        jPanel9.setName("jPanel9"); // NOI18N
        jPanel9.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel16.setName("jPanel16"); // NOI18N

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 354, Short.MAX_VALUE)
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel9.add(jPanel16);

        jPanel17.setName("jPanel17"); // NOI18N
        jPanel17.setLayout(new java.awt.BorderLayout());

        jTextFieldVenderName.setText(resourceMap.getString("jTextFieldVenderName.text")); // NOI18N
        jTextFieldVenderName.setName("jTextFieldVenderName"); // NOI18N
        jTextFieldVenderName.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldVenderNameMouseClicked(evt);
            }
        });
        jTextFieldVenderName.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jTextFieldVenderNameFocusLost(evt);
            }
        });
        jPanel17.add(jTextFieldVenderName, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel17);

        jPanel18.setName("jPanel18"); // NOI18N
        jPanel18.setLayout(new java.awt.BorderLayout());

        jTextFieldAddress.setText(resourceMap.getString("jTextFieldAddress.text")); // NOI18N
        jTextFieldAddress.setName("jTextFieldAddress"); // NOI18N
        jTextFieldAddress.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jTextFieldAddressFocusLost(evt);
            }
        });
        jPanel18.add(jTextFieldAddress, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel18);

        jPanel19.setName("jPanel19"); // NOI18N
        jPanel19.setLayout(new java.awt.BorderLayout());

        jTextFieldEmail.setText(resourceMap.getString("jTextFieldEmail.text")); // NOI18N
        jTextFieldEmail.setName("jTextFieldEmail"); // NOI18N
        jTextFieldEmail.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jTextFieldEmailFocusLost(evt);
            }
        });
        jPanel19.add(jTextFieldEmail, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel19);

        jPanel20.setName("jPanel20"); // NOI18N
        jPanel20.setLayout(new java.awt.BorderLayout());

        jTextFieldPhone.setText(resourceMap.getString("jTextFieldPhone.text")); // NOI18N
        jTextFieldPhone.setName("jTextFieldPhone"); // NOI18N
        jTextFieldPhone.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jTextFieldPhoneFocusLost(evt);
            }
        });
        jPanel20.add(jTextFieldPhone, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel20);

        jPanel21.setName("jPanel21"); // NOI18N
        jPanel21.setLayout(new java.awt.BorderLayout());

        jPanel22.setName("jPanel22"); // NOI18N
        jPanel22.setPreferredSize(new java.awt.Dimension(86, 27));
        jPanel22.setLayout(new java.awt.BorderLayout());

        jButtonAdd.setIcon(resourceMap.getIcon("jButtonAdd.icon")); // NOI18N
        jButtonAdd.setText(resourceMap.getString("jButtonAdd.text")); // NOI18N
        jButtonAdd.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jButtonAdd.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        jButtonAdd.setName("jButtonAdd"); // NOI18N
        jButtonAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAddActionPerformed(evt);
            }
        });
        jPanel22.add(jButtonAdd, java.awt.BorderLayout.CENTER);

        jPanel21.add(jPanel22, java.awt.BorderLayout.LINE_START);

        jPanel23.setName("jPanel23"); // NOI18N
        jPanel23.setLayout(new java.awt.BorderLayout());

        jPanel24.setName("jPanel24"); // NOI18N
        jPanel24.setPreferredSize(new java.awt.Dimension(86, 27));
        jPanel24.setLayout(new java.awt.BorderLayout());

        jButtonEdit.setIcon(resourceMap.getIcon("jButtonEdit.icon")); // NOI18N
        jButtonEdit.setText(resourceMap.getString("jButtonEdit.text")); // NOI18N
        jButtonEdit.setName("jButtonEdit"); // NOI18N
        jButtonEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEditActionPerformed(evt);
            }
        });
        jPanel24.add(jButtonEdit, java.awt.BorderLayout.CENTER);

        jPanel23.add(jPanel24, java.awt.BorderLayout.LINE_START);

        jPanel25.setName("jPanel25"); // NOI18N
        jPanel25.setLayout(new java.awt.BorderLayout());

        jPanel26.setName("jPanel26"); // NOI18N
        jPanel26.setPreferredSize(new java.awt.Dimension(87, 27));
        jPanel26.setLayout(new java.awt.BorderLayout());

        jButtonDelete.setIcon(resourceMap.getIcon("jButtonDelete.icon")); // NOI18N
        jButtonDelete.setText(resourceMap.getString("jButtonDelete.text")); // NOI18N
        jButtonDelete.setName("jButtonDelete"); // NOI18N
        jButtonDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDeleteActionPerformed(evt);
            }
        });
        jPanel26.add(jButtonDelete, java.awt.BorderLayout.CENTER);

        jPanel25.add(jPanel26, java.awt.BorderLayout.LINE_START);

        jPanel27.setName("jPanel27"); // NOI18N
        jPanel27.setPreferredSize(new java.awt.Dimension(95, 27));
        jPanel27.setLayout(new java.awt.BorderLayout());

        jButtonRefresh.setIcon(resourceMap.getIcon("jButtonRefresh.icon")); // NOI18N
        jButtonRefresh.setText(resourceMap.getString("jButtonRefresh.text")); // NOI18N
        jButtonRefresh.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jButtonRefresh.setInheritsPopupMenu(true);
        jButtonRefresh.setName("jButtonRefresh"); // NOI18N
        jButtonRefresh.setPreferredSize(new java.awt.Dimension(72, 23));
        jButtonRefresh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonRefreshActionPerformed(evt);
            }
        });
        jPanel27.add(jButtonRefresh, java.awt.BorderLayout.CENTER);

        jPanel25.add(jPanel27, java.awt.BorderLayout.LINE_END);

        jPanel23.add(jPanel25, java.awt.BorderLayout.CENTER);

        jPanel21.add(jPanel23, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel21);

        jPanel7.add(jPanel9, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel7, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel3);

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel4.border.border.lineColor"), 2), resourceMap.getString("jPanel4.border.title"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setLayout(new java.awt.BorderLayout());

        jPanel28.setName("jPanel28"); // NOI18N
        jPanel28.setPreferredSize(new java.awt.Dimension(946, 30));
        jPanel28.setLayout(new java.awt.BorderLayout());

        jPanel30.setName("jPanel30"); // NOI18N
        jPanel30.setPreferredSize(new java.awt.Dimension(280, 30));
        jPanel30.setLayout(new java.awt.BorderLayout());
        jPanel28.add(jPanel30, java.awt.BorderLayout.LINE_START);

        jPanel31.setName("jPanel31"); // NOI18N
        jPanel31.setPreferredSize(new java.awt.Dimension(250, 30));
        jPanel31.setLayout(new java.awt.BorderLayout());

        jPanel39.setName("jPanel39"); // NOI18N
        jPanel39.setPreferredSize(new java.awt.Dimension(50, 30));
        jPanel39.setLayout(new java.awt.BorderLayout());

        jLabelValue.setFont(resourceMap.getFont("jLabelValue.font")); // NOI18N
        jLabelValue.setForeground(resourceMap.getColor("jLabelValue.foreground")); // NOI18N
        jLabelValue.setText(resourceMap.getString("jLabelValue.text")); // NOI18N
        jLabelValue.setName("jLabelValue"); // NOI18N
        jPanel39.add(jLabelValue, java.awt.BorderLayout.CENTER);

        jPanel31.add(jPanel39, java.awt.BorderLayout.LINE_END);

        jPanel28.add(jPanel31, java.awt.BorderLayout.LINE_END);

        jPanel32.setName("jPanel32"); // NOI18N
        jPanel32.setLayout(new java.awt.BorderLayout());

        jPanel34.setName("jPanel34"); // NOI18N
        jPanel34.setLayout(new java.awt.GridLayout(0, 4, 3, 3));

        jPanel37.setName("jPanel37"); // NOI18N
        jPanel37.setPreferredSize(new java.awt.Dimension(130, 30));
        jPanel37.setLayout(new java.awt.BorderLayout());

        jButtonPrevious.setIcon(resourceMap.getIcon("jButtonPrevious.icon")); // NOI18N
        jButtonPrevious.setText(resourceMap.getString("jButtonPrevious.text")); // NOI18N
        jButtonPrevious.setName("jButtonPrevious"); // NOI18N
        jButtonPrevious.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPreviousActionPerformed(evt);
            }
        });
        jPanel37.add(jButtonPrevious, java.awt.BorderLayout.CENTER);

        jPanel34.add(jPanel37);

        jPanel38.setName("jPanel38"); // NOI18N
        jPanel38.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel38.setLayout(new java.awt.BorderLayout());

        jButtonNext.setIcon(resourceMap.getIcon("jButtonNext.icon")); // NOI18N
        jButtonNext.setText(resourceMap.getString("jButtonNext.text")); // NOI18N
        jButtonNext.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        jButtonNext.setName("jButtonNext"); // NOI18N
        jButtonNext.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNextActionPerformed(evt);
            }
        });
        jPanel38.add(jButtonNext, java.awt.BorderLayout.CENTER);

        jPanel34.add(jPanel38);

        jPanel87.setName("jPanel87"); // NOI18N
        jPanel87.setPreferredSize(new java.awt.Dimension(50, 30));
        jPanel87.setLayout(new java.awt.BorderLayout());

        jTextFieldGTri.setFont(resourceMap.getFont("jTextFieldGTri.font")); // NOI18N
        jTextFieldGTri.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jTextFieldGTri.setText(resourceMap.getString("jTextFieldGTri.text")); // NOI18N
        jTextFieldGTri.setName("jTextFieldGTri"); // NOI18N
        jPanel87.add(jTextFieldGTri, java.awt.BorderLayout.CENTER);

        jPanel34.add(jPanel87);

        jPanel88.setName("jPanel88"); // NOI18N
        jPanel88.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel88.setLayout(new java.awt.BorderLayout());

        jButtonEnter.setIcon(resourceMap.getIcon("jButtonEnter.icon")); // NOI18N
        jButtonEnter.setText(resourceMap.getString("jButtonEnter.text")); // NOI18N
        jButtonEnter.setName("jButtonEnter"); // NOI18N
        jButtonEnter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEnterActionPerformed(evt);
            }
        });
        jPanel88.add(jButtonEnter, java.awt.BorderLayout.CENTER);

        jPanel34.add(jPanel88);

        jPanel32.add(jPanel34, java.awt.BorderLayout.CENTER);

        jPanel28.add(jPanel32, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel28, java.awt.BorderLayout.PAGE_END);

        jPanel29.setName("jPanel29"); // NOI18N
        jPanel29.setLayout(new java.awt.BorderLayout());

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTableVender.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        jTableVender.setComponentPopupMenu(jPopupMenu1);
        jTableVender.setName("jTableVender"); // NOI18N
        jTableVender.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableVenderMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTableVender);

        jPanel29.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel29, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel4);

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N
        jPanel2.setLayout(new java.awt.GridLayout(2, 1, 3, 3));

        jPanel40.setBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel40.border.lineColor"), 3)); // NOI18N
        jPanel40.setName("jPanel40"); // NOI18N
        jPanel40.setLayout(new java.awt.BorderLayout());

        jPanel42.setName("jPanel42"); // NOI18N
        jPanel42.setPreferredSize(new java.awt.Dimension(320, 203));

        javax.swing.GroupLayout jPanel42Layout = new javax.swing.GroupLayout(jPanel42);
        jPanel42.setLayout(jPanel42Layout);
        jPanel42Layout.setHorizontalGroup(
            jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 320, Short.MAX_VALUE)
        );
        jPanel42Layout.setVerticalGroup(
            jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 211, Short.MAX_VALUE)
        );

        jPanel40.add(jPanel42, java.awt.BorderLayout.LINE_END);

        jPanel43.setName("jPanel43"); // NOI18N
        jPanel43.setPreferredSize(new java.awt.Dimension(280, 203));

        javax.swing.GroupLayout jPanel43Layout = new javax.swing.GroupLayout(jPanel43);
        jPanel43.setLayout(jPanel43Layout);
        jPanel43Layout.setHorizontalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 280, Short.MAX_VALUE)
        );
        jPanel43Layout.setVerticalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 211, Short.MAX_VALUE)
        );

        jPanel40.add(jPanel43, java.awt.BorderLayout.LINE_START);

        jPanel44.setName("jPanel44"); // NOI18N
        jPanel44.setLayout(new java.awt.BorderLayout());

        jPanel45.setName("jPanel45"); // NOI18N
        jPanel45.setPreferredSize(new java.awt.Dimension(352, 30));
        jPanel45.setLayout(new java.awt.BorderLayout());

        jLabel6.setFont(resourceMap.getFont("jLabel6.font")); // NOI18N
        jLabel6.setForeground(resourceMap.getColor("jLabel6.foreground")); // NOI18N
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N
        jPanel45.add(jLabel6, java.awt.BorderLayout.CENTER);

        jPanel44.add(jPanel45, java.awt.BorderLayout.PAGE_START);

        jPanel46.setName("jPanel46"); // NOI18N
        jPanel46.setLayout(new java.awt.BorderLayout());

        jPanel47.setName("jPanel47"); // NOI18N
        jPanel47.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel49.setName("jPanel49"); // NOI18N

        javax.swing.GroupLayout jPanel49Layout = new javax.swing.GroupLayout(jPanel49);
        jPanel49.setLayout(jPanel49Layout);
        jPanel49Layout.setHorizontalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel49Layout.setVerticalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel49);

        jPanel50.setName("jPanel50"); // NOI18N
        jPanel50.setLayout(new java.awt.BorderLayout());

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N
        jPanel50.add(jLabel7, java.awt.BorderLayout.CENTER);

        jPanel47.add(jPanel50);

        jPanel51.setName("jPanel51"); // NOI18N

        javax.swing.GroupLayout jPanel51Layout = new javax.swing.GroupLayout(jPanel51);
        jPanel51.setLayout(jPanel51Layout);
        jPanel51Layout.setHorizontalGroup(
            jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel51Layout.setVerticalGroup(
            jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel51);

        jPanel52.setName("jPanel52"); // NOI18N

        javax.swing.GroupLayout jPanel52Layout = new javax.swing.GroupLayout(jPanel52);
        jPanel52.setLayout(jPanel52Layout);
        jPanel52Layout.setHorizontalGroup(
            jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel52Layout.setVerticalGroup(
            jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel52);

        jPanel53.setName("jPanel53"); // NOI18N

        javax.swing.GroupLayout jPanel53Layout = new javax.swing.GroupLayout(jPanel53);
        jPanel53.setLayout(jPanel53Layout);
        jPanel53Layout.setHorizontalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel53Layout.setVerticalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel53);

        jPanel54.setName("jPanel54"); // NOI18N

        javax.swing.GroupLayout jPanel54Layout = new javax.swing.GroupLayout(jPanel54);
        jPanel54.setLayout(jPanel54Layout);
        jPanel54Layout.setHorizontalGroup(
            jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel54Layout.setVerticalGroup(
            jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel54);

        jPanel46.add(jPanel47, java.awt.BorderLayout.LINE_START);

        jPanel48.setName("jPanel48"); // NOI18N
        jPanel48.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel55.setName("jPanel55"); // NOI18N

        javax.swing.GroupLayout jPanel55Layout = new javax.swing.GroupLayout(jPanel55);
        jPanel55.setLayout(jPanel55Layout);
        jPanel55Layout.setHorizontalGroup(
            jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 252, Short.MAX_VALUE)
        );
        jPanel55Layout.setVerticalGroup(
            jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel48.add(jPanel55);

        jPanel56.setName("jPanel56"); // NOI18N
        jPanel56.setLayout(new java.awt.BorderLayout());

        jTextFieldVDSearch.setFont(resourceMap.getFont("jTextFieldVDSearch.font")); // NOI18N
        jTextFieldVDSearch.setText(resourceMap.getString("jTextFieldVDSearch.text")); // NOI18N
        jTextFieldVDSearch.setName("jTextFieldVDSearch"); // NOI18N
        jPanel56.add(jTextFieldVDSearch, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel56);

        jPanel57.setName("jPanel57"); // NOI18N
        jPanel57.setLayout(new java.awt.BorderLayout());

        jPanel61.setName("jPanel61"); // NOI18N
        jPanel61.setPreferredSize(new java.awt.Dimension(80, 27));

        javax.swing.GroupLayout jPanel61Layout = new javax.swing.GroupLayout(jPanel61);
        jPanel61.setLayout(jPanel61Layout);
        jPanel61Layout.setHorizontalGroup(
            jPanel61Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 80, Short.MAX_VALUE)
        );
        jPanel61Layout.setVerticalGroup(
            jPanel61Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel57.add(jPanel61, java.awt.BorderLayout.LINE_START);

        jPanel62.setName("jPanel62"); // NOI18N
        jPanel62.setLayout(new java.awt.BorderLayout());

        jPanel63.setName("jPanel63"); // NOI18N
        jPanel63.setPreferredSize(new java.awt.Dimension(100, 26));
        jPanel63.setLayout(new java.awt.BorderLayout());

        jButtonSearch.setText(resourceMap.getString("jButtonSearch.text")); // NOI18N
        jButtonSearch.setName("jButtonSearch"); // NOI18N
        jButtonSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSearchActionPerformed(evt);
            }
        });
        jPanel63.add(jButtonSearch, java.awt.BorderLayout.CENTER);

        jPanel62.add(jPanel63, java.awt.BorderLayout.LINE_START);

        jPanel64.setName("jPanel64"); // NOI18N
        jPanel64.setPreferredSize(new java.awt.Dimension(82, 26));

        javax.swing.GroupLayout jPanel64Layout = new javax.swing.GroupLayout(jPanel64);
        jPanel64.setLayout(jPanel64Layout);
        jPanel64Layout.setHorizontalGroup(
            jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 82, Short.MAX_VALUE)
        );
        jPanel64Layout.setVerticalGroup(
            jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel62.add(jPanel64, java.awt.BorderLayout.LINE_END);

        jPanel57.add(jPanel62, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel57);

        jPanel58.setName("jPanel58"); // NOI18N

        javax.swing.GroupLayout jPanel58Layout = new javax.swing.GroupLayout(jPanel58);
        jPanel58.setLayout(jPanel58Layout);
        jPanel58Layout.setHorizontalGroup(
            jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 252, Short.MAX_VALUE)
        );
        jPanel58Layout.setVerticalGroup(
            jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel48.add(jPanel58);

        jPanel59.setName("jPanel59"); // NOI18N

        javax.swing.GroupLayout jPanel59Layout = new javax.swing.GroupLayout(jPanel59);
        jPanel59.setLayout(jPanel59Layout);
        jPanel59Layout.setHorizontalGroup(
            jPanel59Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 252, Short.MAX_VALUE)
        );
        jPanel59Layout.setVerticalGroup(
            jPanel59Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel48.add(jPanel59);

        jPanel60.setName("jPanel60"); // NOI18N

        javax.swing.GroupLayout jPanel60Layout = new javax.swing.GroupLayout(jPanel60);
        jPanel60.setLayout(jPanel60Layout);
        jPanel60Layout.setHorizontalGroup(
            jPanel60Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 252, Short.MAX_VALUE)
        );
        jPanel60Layout.setVerticalGroup(
            jPanel60Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 27, Short.MAX_VALUE)
        );

        jPanel48.add(jPanel60);

        jPanel46.add(jPanel48, java.awt.BorderLayout.CENTER);

        jPanel44.add(jPanel46, java.awt.BorderLayout.CENTER);

        jPanel40.add(jPanel44, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel40);

        jPanel41.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel41.border.border.lineColor"), 2), resourceMap.getString("jPanel41.border.title"))); // NOI18N
        jPanel41.setName("jPanel41"); // NOI18N
        jPanel41.setLayout(new java.awt.BorderLayout());

        jPanel67.setName("jPanel67"); // NOI18N
        jPanel67.setLayout(new java.awt.BorderLayout());

        jPanel69.setName("jPanel69"); // NOI18N
        jPanel69.setLayout(new java.awt.BorderLayout());

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jTableVenderS.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        jTableVenderS.setName("jTableVenderS"); // NOI18N
        jScrollPane2.setViewportView(jTableVenderS);

        jPanel69.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        jPanel67.add(jPanel69, java.awt.BorderLayout.CENTER);

        jPanel41.add(jPanel67, java.awt.BorderLayout.CENTER);

        jPanel65.setName("jPanel65"); // NOI18N
        jPanel65.setPreferredSize(new java.awt.Dimension(946, 30));
        jPanel65.setLayout(new java.awt.GridLayout(1, 0));

        jPanel68.setName("jPanel68"); // NOI18N
        jPanel68.setPreferredSize(new java.awt.Dimension(300, 30));
        jPanel68.setLayout(new java.awt.BorderLayout());

        jPanel71.setName("jPanel71"); // NOI18N
        jPanel71.setPreferredSize(new java.awt.Dimension(280, 30));

        javax.swing.GroupLayout jPanel71Layout = new javax.swing.GroupLayout(jPanel71);
        jPanel71.setLayout(jPanel71Layout);
        jPanel71Layout.setHorizontalGroup(
            jPanel71Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 280, Short.MAX_VALUE)
        );
        jPanel71Layout.setVerticalGroup(
            jPanel71Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel68.add(jPanel71, java.awt.BorderLayout.LINE_START);

        jPanel72.setName("jPanel72"); // NOI18N
        jPanel72.setLayout(new java.awt.BorderLayout());

        jPanel70.setName("jPanel70"); // NOI18N
        jPanel70.setPreferredSize(new java.awt.Dimension(280, 30));
        jPanel70.setLayout(new java.awt.BorderLayout());

        jPanel91.setName("jPanel91"); // NOI18N
        jPanel91.setPreferredSize(new java.awt.Dimension(50, 30));
        jPanel91.setLayout(new java.awt.BorderLayout());

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N
        jPanel91.add(jLabel5, java.awt.BorderLayout.CENTER);

        jPanel70.add(jPanel91, java.awt.BorderLayout.LINE_END);

        jPanel72.add(jPanel70, java.awt.BorderLayout.LINE_END);

        jPanel73.setName("jPanel73"); // NOI18N
        jPanel73.setLayout(new java.awt.BorderLayout());

        jPanel75.setName("jPanel75"); // NOI18N
        jPanel75.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel75.setLayout(new java.awt.BorderLayout());

        jButton8.setText(resourceMap.getString("jButton8.text")); // NOI18N
        jButton8.setName("jButton8"); // NOI18N
        jPanel75.add(jButton8, java.awt.BorderLayout.CENTER);

        jPanel73.add(jPanel75, java.awt.BorderLayout.LINE_START);

        jPanel76.setName("jPanel76"); // NOI18N
        jPanel76.setPreferredSize(new java.awt.Dimension(90, 30));
        jPanel76.setLayout(new java.awt.BorderLayout());

        jButton11.setText(resourceMap.getString("jButton11.text")); // NOI18N
        jButton11.setName("jButton11"); // NOI18N
        jPanel76.add(jButton11, java.awt.BorderLayout.CENTER);

        jPanel73.add(jPanel76, java.awt.BorderLayout.LINE_END);

        jPanel77.setName("jPanel77"); // NOI18N
        jPanel77.setLayout(new java.awt.BorderLayout());

        jPanel89.setName("jPanel89"); // NOI18N
        jPanel89.setLayout(new java.awt.BorderLayout());

        jButton9.setText(resourceMap.getString("jButton9.text")); // NOI18N
        jButton9.setName("jButton9"); // NOI18N
        jPanel89.add(jButton9, java.awt.BorderLayout.CENTER);

        jPanel77.add(jPanel89, java.awt.BorderLayout.LINE_START);

        jPanel90.setName("jPanel90"); // NOI18N
        jPanel90.setPreferredSize(new java.awt.Dimension(80, 30));
        jPanel90.setLayout(new java.awt.BorderLayout());

        jTextField3.setText(resourceMap.getString("jTextField3.text")); // NOI18N
        jTextField3.setName("jTextField3"); // NOI18N
        jPanel90.add(jTextField3, java.awt.BorderLayout.CENTER);

        jPanel77.add(jPanel90, java.awt.BorderLayout.CENTER);

        jPanel73.add(jPanel77, java.awt.BorderLayout.CENTER);

        jPanel72.add(jPanel73, java.awt.BorderLayout.CENTER);

        jPanel68.add(jPanel72, java.awt.BorderLayout.CENTER);

        jPanel65.add(jPanel68);

        jPanel41.add(jPanel65, java.awt.BorderLayout.PAGE_END);

        jPanel2.add(jPanel41);

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddActionPerformed
        Vender vd = new Vender();
        vd.setVenderName(this.jTextFieldVenderName.getText());
        vd.setAddress(this.jTextFieldAddress.getText());
        vd.setPhone(this.jTextFieldPhone.getText());
        vd.setEmail(this.jTextFieldEmail.getText());
        if (jTextFieldVenderName.getText().trim().equals("")) {
            this.jLabelVenderNameKT.setText("Not null");
            jTextFieldVenderName.requestFocus();
            return;
        }
        if (jTextFieldAddress.getText().trim().equals("")) {
            this.jLabelAddressKT.setText("Not null");
            jTextFieldAddress.requestFocus();
            return;
        }
        if (!Check.Emailinvalid(jTextFieldEmail.getText())) {
            this.jLabelEmailKT.setText("Invalid");
            jTextFieldEmail.requestFocus();
            return;
        }
        if (jTextFieldPhone.getText().trim().equals("")) {
            this.jLabelPhoneKT.setText("Not null");
            return;
        }

        try {
            if (KTS(jTextFieldVenderName.getText()) == false) {
                //JOptionPane.showMessageDialog(null, "ton tai");
                try {
                    ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\administrator_business_man_consultancy_man_user_icon.png");
                    JOptionPane.showMessageDialog(null, "Object already exists", "Notice", 0, iic);
                } catch (Exception e) {
                }
            } else {
                if (vd.AddVD()) {
                    try {
                        ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\add_add_user_group_new_user_icon.png");
                        JOptionPane.showMessageDialog(null, "Add successful", "Notice", 0, iic);
                        ShowList(0, 5);
                    } catch (Exception e) {
                    }
                }
                //JOptionPane.showMessageDialog(null, "thanh cong");



            }
        } catch (Exception e) {
            {
                ImageIcon iic = null;
                try {
                    iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\add_add_user_group_new_user_icon.png");
                } catch (IOException ex) {
                    Logger.getLogger(JInternalFrameVender1.class.getName()).log(Level.SEVERE, null, ex);
                }
                JOptionPane.showMessageDialog(null, "Add failure", "Notice", 0, iic);
            }
        }
    }//GEN-LAST:event_jButtonAddActionPerformed

    /*
    Vector<Object> ctl = new Vector<Object>();
    ctl.add("CatalogName");
    ctl.add("VenderName");
    DefaultTableModel dtm = new DefaultTableModel(Catalogue.ListCatalog2(a), ctl)
    {
    
    @Override
    public boolean isCellEditable(int row, int column) {
    return false;
    }
    
    };
    jTableSCatalog.setModel(dtm);
     * 
     * cv.setVenderId(vdr.get(jComboBoxVenderName.getSelectedIndex()).getVenderId());
     */
    private void DienDL(String chuoi) {
        Vector<Object> cols = new Vector<Object>();
        cols.add("VenderId");
        cols.add("VenderName");
        DefaultTableModel dtm = new DefaultTableModel(Vender.SearchVander(chuoi), cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableVenderS.setModel(dtm);
    }

    private void jButtonEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEditActionPerformed

        if (rs == false) {
            // JOptionPane.showMessageDialog(null, "Select the object for editing !");
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\canhbao.png");
                JOptionPane.showMessageDialog(null, "Select the object for editing", "Notice", 0, iic);
            } catch (Exception e) {
            }
        } else {
            EditV();
        }
    }//GEN-LAST:event_jButtonEditActionPerformed

    private void jButtonRefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRefreshActionPerformed
        Clear();
    }//GEN-LAST:event_jButtonRefreshActionPerformed

    private void jTableVenderMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableVenderMouseClicked
        rs = true;
        GetInfomation();
        String Vdd = this.jTableVender.getValueAt(this.jTableVender.getSelectedRow(), 0).toString();
        jLabelValue.setText(Vdd);
    }//GEN-LAST:event_jTableVenderMouseClicked

    public boolean KTDEL(String id) {
        boolean kq = true;
        if (!Vender.Catalogue_Vender(id) || !Vender.CallManagement(id) || !Vender.PurcharBill(id)) {

            kq = false;
        } else {
            kq = true;
        }
        return kq;
    }

    private void jButtonDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteActionPerformed


        if (rs == false) {
            //JOptionPane.showMessageDialog(null, "Select the object to delete");
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\canhbao.png");
                JOptionPane.showMessageDialog(null, "Select the object to delete", "Notice", 0, iic);
            } catch (Exception e) {
            }
        } else {
            if (KTDEL(jLabelValue.getText()) == false) {
                //JOptionPane.showMessageDialog(null, "Can not delete this object !");
                try {
                    ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\war.png");
                    JOptionPane.showMessageDialog(null, "Can not delete this object", "Notice", 0, iic);
                } catch (Exception e) {
                }

            } else {
                int op = JOptionPane.showConfirmDialog(null, "Are you sure to delete ?", "Message", JOptionPane.OK_CANCEL_OPTION);
                if (op == JOptionPane.OK_OPTION) {

                    Vender vd = new Vender();
                    if (vd.DeleteVD(Integer.valueOf(jLabelValue.getText()))) {
                        // JOptionPane.showMessageDialog(null, "Delete success !");
                        try {
                            ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\delete_edit_trash_icon.png");
                            JOptionPane.showMessageDialog(null, "Delete Success", "Notice", 0, iic);
                            Clear();
                        } catch (Exception e) {
                        }
                        int b = (count * 5) - 5;
                        ShowList(b, count * 5);
                        
                    } else {
                        //   JOptionPane.showMessageDialog(null, "Delete failed !");
                        try {
                            ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\error.png");
                            JOptionPane.showMessageDialog(null, "Delete Failure", "Notice", 0, iic);
                        } catch (Exception e) {
                        }
                    }
                }

            }
        }


    }//GEN-LAST:event_jButtonDeleteActionPerformed

    private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSearchActionPerformed
//
//        if(rs==false)
//        {
//            JOptionPane.showMessageDialog(null, "Enter the subject should find");
//        }
//        else
//        {    
        DienDL(this.jTextFieldVDSearch.getText());
        // }
    }//GEN-LAST:event_jButtonSearchActionPerformed

    private void jTextFieldVenderNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldVenderNameMouseClicked
        // TODO add your handling code here:
        jTextFieldVenderName.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));
    }//GEN-LAST:event_jTextFieldVenderNameMouseClicked

    private void jTextFieldVenderNameFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldVenderNameFocusLost
        if (!jTextFieldVenderName.getText().equals("")) {
            this.jLabelVenderNameKT.setText("");
        }
    }//GEN-LAST:event_jTextFieldVenderNameFocusLost

    private void jTextFieldAddressFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldAddressFocusLost
        // TODO add your handling code here:
        if (!jTextFieldAddress.getText().equals("")) {
            this.jLabelAddressKT.setText("");
        }
    }//GEN-LAST:event_jTextFieldAddressFocusLost

    private void jTextFieldEmailFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldEmailFocusLost
        // TODO add your handling code here:
        if (!jTextFieldEmail.getText().equals("")) {
            this.jLabelEmailKT.setText("");
        }
    }//GEN-LAST:event_jTextFieldEmailFocusLost

    private void jTextFieldPhoneFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldPhoneFocusLost
        // TODO add your handling code here:
        if (!jTextFieldPhone.getText().equals("")) {
            jLabelPhoneKT.setText("");
        }
    }//GEN-LAST:event_jTextFieldPhoneFocusLost

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        if (rs == false) {
            //JOptionPane.showMessageDialog(null, "Select the object to delete");
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\canhbao.png");
                JOptionPane.showMessageDialog(null, "Select the object to delete", "Notice", 0, iic);
            } catch (Exception e) {
            }
        } else {
            if (KTDEL(jLabelValue.getText()) == false) {
                //JOptionPane.showMessageDialog(null, "Can not delete this object !");
                try {
                    ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\war.png");
                    JOptionPane.showMessageDialog(null, "Can not delete this object", "Notice", 0, iic);
                } catch (Exception e) {
                }

            } else {
                int op = JOptionPane.showConfirmDialog(null, "Are you sure to delete ?", "Message", JOptionPane.OK_CANCEL_OPTION);
                if (op == JOptionPane.OK_OPTION) {

                    Vender vd = new Vender();
                    if (vd.DeleteVD(Integer.valueOf(jLabelValue.getText()))) {
                        // JOptionPane.showMessageDialog(null, "Delete success !");
                        try {
                            ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\delete_edit_trash_icon.png");
                            JOptionPane.showMessageDialog(null, "Delete Success", "Notice", 0, iic);
                        } catch (Exception e) {
                        }
                        int b = (count * 5) - 5;
                        ShowList(b, count * 5);
                    } else {
                        //   JOptionPane.showMessageDialog(null, "Delete failed !");
                        try {
                            ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\delete_edit_trash_icon.png");
                            JOptionPane.showMessageDialog(null, "Delete Failure", "Notice", 0, iic);
                        } catch (Exception e) {
                        }
                    }
                }

            }
        }
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jButtonEnterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEnterActionPerformed
        // TODO add your handling code here:
        if (!Check.isNumber(jTextFieldGTri.getText())) {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\war.png");
                JOptionPane.showMessageDialog(null, "Enter the number of pages", "Notice", 0, iic);
            } catch (Exception e) {
            }

        } else {


            String a1 = jTextFieldGTri.getText().trim();
            int a = Integer.valueOf(a1);
            if (a > (Vender.Count() / 5) + 1 || a < 1) {
                try {
                    ImageIcon iic = new ImageIcon(f.getCanonicalPath() + "\\src\\callcenter\\resources\\Images\\war.png");
                    JOptionPane.showMessageDialog(null, "Does not exist", "Notice", 0, iic);
                } catch (Exception e) {
                    System.out.println(e);
                }
            } else {
                count = Integer.valueOf(jTextFieldGTri.getText());
                jButtonPrevious.setEnabled(true);
                if (count > Vender.Count() / 5) {
                    int d = (count - 1) * 5;
                    ShowList(d, Vender.Count());
                    jButtonNext.setEnabled(false);
                } else {

                    int b = (count * 5) - 5;
                    jLabelValue.setText(String.valueOf(count));

                    ShowList(b, count * 5);
                }
            }
        }
    }//GEN-LAST:event_jButtonEnterActionPerformed

    private void jButtonNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNextActionPerformed
        // TODO add your handling code here:
        count++;
        jButtonPrevious.setEnabled(true);
        if (count > Vender.Count() / 5) {
            int d = (count - 1) * 5;
            ShowList(d, Vender.Count());
            jButtonNext.setEnabled(false);
        } else {

            int b = (count * 5) - 5;
            jLabelValue.setText(String.valueOf(count));

            ShowList(b, count * 5);
        }
    }//GEN-LAST:event_jButtonNextActionPerformed

    private void jButtonPreviousActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPreviousActionPerformed
        // TODO add your handling code here:
        count--;
        int b = (count * 5) - 5;
        jLabelValue.setText(String.valueOf(count));
        jButtonNext.setEnabled(true);
        ShowList(b, count * 5);
        if (count == 1) {
            jButtonPrevious.setEnabled(false);
        }
    }//GEN-LAST:event_jButtonPreviousActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JButton jButtonAdd;
    private javax.swing.JButton jButtonDelete;
    private javax.swing.JButton jButtonEdit;
    private javax.swing.JButton jButtonEnter;
    private javax.swing.JButton jButtonNext;
    private javax.swing.JButton jButtonPrevious;
    private javax.swing.JButton jButtonRefresh;
    private javax.swing.JButton jButtonSearch;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabelAddressKT;
    private javax.swing.JLabel jLabelEmailKT;
    private javax.swing.JLabel jLabelPhoneKT;
    private javax.swing.JLabel jLabelValue;
    private javax.swing.JLabel jLabelVenderNameKT;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel54;
    private javax.swing.JPanel jPanel55;
    private javax.swing.JPanel jPanel56;
    private javax.swing.JPanel jPanel57;
    private javax.swing.JPanel jPanel58;
    private javax.swing.JPanel jPanel59;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel60;
    private javax.swing.JPanel jPanel61;
    private javax.swing.JPanel jPanel62;
    private javax.swing.JPanel jPanel63;
    private javax.swing.JPanel jPanel64;
    private javax.swing.JPanel jPanel65;
    private javax.swing.JPanel jPanel66;
    private javax.swing.JPanel jPanel67;
    private javax.swing.JPanel jPanel68;
    private javax.swing.JPanel jPanel69;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel70;
    private javax.swing.JPanel jPanel71;
    private javax.swing.JPanel jPanel72;
    private javax.swing.JPanel jPanel73;
    private javax.swing.JPanel jPanel74;
    private javax.swing.JPanel jPanel75;
    private javax.swing.JPanel jPanel76;
    private javax.swing.JPanel jPanel77;
    private javax.swing.JPanel jPanel78;
    private javax.swing.JPanel jPanel79;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel80;
    private javax.swing.JPanel jPanel81;
    private javax.swing.JPanel jPanel82;
    private javax.swing.JPanel jPanel83;
    private javax.swing.JPanel jPanel84;
    private javax.swing.JPanel jPanel85;
    private javax.swing.JPanel jPanel86;
    private javax.swing.JPanel jPanel87;
    private javax.swing.JPanel jPanel88;
    private javax.swing.JPanel jPanel89;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanel90;
    private javax.swing.JPanel jPanel91;
    private javax.swing.JPopupMenu jPopupMenu1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTableVender;
    private javax.swing.JTable jTableVenderS;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextFieldAddress;
    private javax.swing.JTextField jTextFieldEmail;
    private javax.swing.JTextField jTextFieldGTri;
    private javax.swing.JTextField jTextFieldPhone;
    private javax.swing.JTextField jTextFieldVDSearch;
    private javax.swing.JTextField jTextFieldVenderName;
    // End of variables declaration//GEN-END:variables
}
